#pragma once
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
//#include <opencv2/opencv.hpp>
#include <opencv2/BlobResult.h>


class HeadTracker
{
public:
	HeadTracker(void);
	~HeadTracker(void);

	int init();
	void set_Min_HSV(int H, int S, int V);
	void set_Max_HSV(int H, int S, int V);
	void set_thresh_size(int thresh_size);
	CvRect get_rectangle();

private:

	IplImage* GetThresholdedImageHSV( IplImage* img );

	int minH; int minS; int minV;
	int maxH; int maxS; int maxV;
	int min_thresh_size;
	CBlobResult blobs;    
    CBlob *currentBlob;   
    CvPoint pt1, pt2;  
    CvRect cvRect;  
    int key;  
    IplImage* frame;
	CvCapture* capture;
};

